Package-level declarations

Types

Link copied to clipboard
typealias Amount = List<Int>
Link copied to clipboard
@Serializable
data class ComputingTimes(val loading: Int? = null, val solving: Int? = null, val routing: Int? = null)
Link copied to clipboard
@Serializable
data class CustomMatrix(val durations: List<List<Int>>? = null, val distances: List<List<Int>>? = null)
Link copied to clipboard
@Serializable
data class Job(val id: Int, val service: Int? = null, val delivery: Amount? = null, val pickup: Amount? = null, val amount: Amount? = null, val location: LonLat? = null, val locationIndex: Int? = null, val allowedVehicles: List<Int>? = null, val disallowedVehicles: List<Int>? = null, val skills: Skills? = null, val priority: Int? = null, val timeWindows: List<TimeWindow>? = null)
Link copied to clipboard
typealias LonLat = List<Double>
Link copied to clipboard
@Serializable
data class OptimizationRequest(val jobs: List<Job>? = null, val shipments: List<Shipment>? = null, val vehicles: List<Vehicle>, val matrices: Map<String, CustomMatrix>? = null, val options: Map<String, JsonElement>? = null)

Root payload sent to /optimization See: https://github.com/VROOM-Project/vroom/blob/master/docs/API.md

Link copied to clipboard
Link copied to clipboard

Java-friendly builder counterpart.

Link copied to clipboard
@Serializable
data class OptimizationResponse(val code: Int, val summary: OptimizationSummary, val unassigned: List<Unassigned> = emptyList(), val routes: List<OptimizedRoute> = emptyList())

Top-level result from /optimization

Link copied to clipboard
@Serializable
data class OptimizationSummary(val cost: Int, val routes: Int, val unassigned: Int, val delivery: List<Int>? = null, val amount: List<Int>? = null, val pickup: List<Int>? = null, val setup: Int, val service: Int, val duration: Int, val waitingTime: Int, val priority: Int, val violations: List<Violation> = emptyList(), val computingTimes: ComputingTimes? = null)
Link copied to clipboard
@Serializable
data class OptimizedRoute(val vehicle: Int, val cost: Int, val delivery: List<Int>? = null, val amount: List<Int>? = null, val pickup: List<Int>? = null, val setup: Int, val service: Int, val duration: Int, val waitingTime: Int, val priority: Int, val steps: List<RouteStep> = emptyList(), val violations: List<Violation> = emptyList())
Link copied to clipboard
@Serializable
data class RouteStep(val type: String, val location: LonLat, val id: Int? = null, val job: Int? = null, val setup: Int? = null, val service: Int? = null, val waitingTime: Int? = null, val load: List<Int>? = null, val arrival: Int? = null, val duration: Int? = null, val violations: List<Violation> = emptyList())
Link copied to clipboard
@Serializable
data class Shipment(val id: Int, val amount: Amount? = null, val pickup: ShipmentStep, val delivery: ShipmentStep, val skills: Skills? = null, val priority: Int? = null)
Link copied to clipboard
@Serializable
data class ShipmentStep(val service: Int? = null, val location: LonLat? = null, val locationIndex: Int? = null, val timeWindows: List<TimeWindow>? = null)
Link copied to clipboard
typealias Skills = List<Int>
Link copied to clipboard
@Serializable
data class TimeWindow(val start: Int, val end: Int)
Link copied to clipboard
@Serializable
data class Unassigned(val id: Int, val location: LonLat, val type: String)
Link copied to clipboard
@Serializable
data class Vehicle(val id: Int, val profile: String, val capacity: Amount? = null, val start: LonLat? = null, val end: LonLat? = null, val startIndex: Int? = null, val endIndex: Int? = null, val skills: Skills? = null, val timeWindow: TimeWindow? = null, val breaks: List<VehicleBreak>? = null, val earliestStart: Int? = null, val latestEnd: Int? = null, val maxTasks: Int? = null, val maxTravelTime: Int? = null, val description: String? = null)
Link copied to clipboard
@Serializable
data class VehicleBreak(val service: Int? = null, val timeWindows: List<TimeWindow>)
Link copied to clipboard
@Serializable
data class Violation(val type: String? = null, val id: Int? = null, val job: Int? = null, val description: String? = null)

Kept flexible; VROOM may return several shapes depending on constraint hit.

Functions

Link copied to clipboard